/*
	---------------------------------------------
	-	Scroll Watcher
	-	/site.scroll.js
	-	Handles the scroll event and any related functions
	---------------------------------------------
	-	Author:	James Haley
	-			james.haley@wapisasa.com
	-			24/09/2013 13:25:33
	---------------------------------------------
*/

	//	++ Scroll Watcher
	//----------------------------------------------
	//	First run scripts, adding listeners etc...
	
		(site.scroll = function() {
			return {
				_actions:[],
				setup:function(){
					// Setup listener
					Event.observe($(window),'scroll',function(event){
						// Run through requested functions
						site.scroll._actions.each(
							function(o){
								o.call();
							}
						);
					});

					// Run functions for initial load
					site.scroll._actions.each(
						function(o){
							o.call();
						}
					);
				}
			}
		}());


	//	++ Custom Functions
	//----------------------------------------------
	//	Functions that are fired when the window is scrolled
	
		(site.scrollActions = {
			
		});
		
	//	++ Queue up for initialisation
	//----------------------------------------------
	site.setup._initial.push(site.scroll.setup);